<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
  <head>
  <script type="text/javascript">
  	$(function(){
  		$('#add_day').change(function(){
  			if($(this).val()!=""){
  				$('#add_night').val(parseInt($(this).val())-1);//默认夜晚少一天
  			}
  		});
  	});
  </script>
  </head>  
  <body>
  	<!-- 验证还是jquery-validation好用，这里省事没用 -->
	<form class="auform" id="routeForm" method="post">
		<input type="hidden" name="routeId" id="routeId">
		<table class="autable">
			<tr>
				<td class="autd1">线路名称：</td>
				<td class="autd2"><input name="routeName" class="easyui-validatebox txt" validType="length[2,30]" required="true"><span class="red">*</span></td>
				<td class="autd1">是否推荐：</td>
				<td class="autd2">
					<select class="easyui-combobox" name="hot" panelHeight="auto" style="width:150px;" required="true" editable="false">
						<option value="-1">请选择</option>
						<option value="1">是</option>
						<option value="0">否</option>
					</select><span class="red">*</span>
				</td>			
			</tr>
			<tr>
				<td class="autd1">几天：</td>
				<td class="autd2"><input name="day" id="add_day" class="easyui-numberbox txt" min="1" max="100" precision="0" required="true"><span class="red">*</span></td>
				<td class="autd1">几夜：</td>
				<td class="autd2"><input name="night" id="add_night" class="easyui-numberbox txt" min="0" max="100" precision="0" required="true"><span class="red">*</span></td>
			</tr>
			<tr>
				<td class="autd1">起始城市：</td>
				<td class="autd2"><input name="orgCityId" id="orgCityId" class="txt" style="width:150px;" editable="false" required="true"/><span class="red">*</span></td>
				<td class="autd1">到达城市：</td>
				<td class="autd2"><input name="dstCityId" id="dstCityId" class="txt" style="width:150px;" editable="false" required="true"><span class="red">*</span></td>
			<tr>
				<td class="autd1">备    注：</td>
				<td class="autd2" colspan="3"><textarea name="remark" class="txtarea" style="width: 435px;height:100px;"></textarea></td>
			</tr>
			<tr>
				<td class="autd3" colspan="4">
					<a href="#" id="btn-back" onclick="$('#MyPopWindow').window('close');" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
					<a href="#" id="btn-add" onclick="add();" class="easyui-linkbutton" iconCls="icon-redo">下一步</a>
				</td>
			</tr>
		</table>
	</form>
  </body>
</html>
